package org.apache.dolphinscheduler.api.service;

import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.dao.entity.Bill;
import org.apache.dolphinscheduler.dao.entity.Couponbill;
import org.apache.dolphinscheduler.dao.entity.Coupondetail;
import org.apache.dolphinscheduler.dao.entity.User;

import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;

/**
 * <p>
 * 收支明细表 服务类
 * </p>
 *
 * @author denggh
 * @since 2023-08-14
 */
public interface CouponbillService {

    Result selectPageCouponbillList(User loginUser, Couponbill couponbill, String issueTpye, String startDateClaim, String endDateClaim, String startDateUse, String endDateUse, String startDateEnd, String endDateEnd, Integer pageSize, Integer pageNo);

    Result selectCouponRule(Integer id);

    Result getCouponbillTable(Integer id);

    Result getUserCouponbills(User loginUser, Integer searchType);

    Result getAvailableCoupon(User loginUser, Integer amount, String billNo, Integer billType);

    void updateCouponbillByDetailId(Couponbill couponbill, Coupondetail coupondetail);

    void exportExcel(User loginUser, Couponbill couponbill, String startDateClaim, String endDateClaim, String startDateUse, String endDateUse, String startDateEnd, String endDateEnd, HttpServletResponse response);

    Result selectCouponUsedTotal(User loginUser, String month);

    Integer addCouponBillByTimeTask(Integer couponDetailId);
}
